﻿using System.Security.Claims;
using System.Threading.Tasks;
using GMS.Models.Jwt;

namespace GMS.IServices.Jwt
{
    public interface IJwtService
    {
        /// <summary>
        /// 创建Token
        /// </summary>
        /// <param name="payload"></param>
        /// <returns></returns>
        Task<string> GenerateTokenAsync(Payload payload);


        /// <summary>
        /// 解析Payload
        /// </summary>
        /// <param name="claims"></param>
        /// <returns></returns>
        Task<Payload> ParseClaim(ClaimsIdentity claims);
    }
}